This invention relates to apparatus for transfer and storage of data and, in particular, to apparatus for the transfer and storage of data from a host computing system to a magnetic tape cartridge or the like.
In recent years, it has become increasingly common for companies and other such organisations to back-up their computing systems (and other in-house back-up systems) by storing data on a series of magnetic tape cartridges, for retrieval in the event that the data is lost or corrupted in the primary systems.
In some systems, blocks of data are written in sets to a magnetic tape together with parity bytes for error checking purposes. The blocks of data may then be read back and passed through an error checking device to determine whether or not the data blocks have been correctly written to the tape and, if not, to cause those sets in which one or more data blocks are determined to be in error to be rewritten to the tape.
In some cases, one or more large memory blocks are used to store information uniquely identifying the sets of data blocks which have been written to the magnetic tape. The error checker referred to above outputs the header of each data block in a set together with a positive or negative indication as to whether the data block has been found to be good or bad. The system then checks the header received from the error checker against the headers stored in the memory block(s), identifies the corresponding data block and marks the data block as good or bad accordingly.
However, a single error in the header information, will result in the corresponding data block not being recognised. As a result, when the time comes to decide whether or not rewrite a set of data blocks, that data block is marked as bad, even though the data block itself may actually have been written to the magnetic tape and read back correctly. In general, data block headers have error detection but not correction, so errors in the headers can become the dominating cause for rewriting sets of data blocks unnecessarily, which slows the data transfer and storage operation down and uses excessive quantities of tape unnecessarily.
We have now devised an arrangement which overcomes the problems outlined above.
In accordance with the present invention, there is provided apparatus for transferring data from a host system to one or more magnetic tape storage devices or the like, the apparatus comprising input apparatus for receiving said data, dividing it into blocks and converting said blocks of data to a format suitable for storage on said one or more storage devices, each block of data including header (or supplementary) information, one or more data writers for writing said blocks of data to said one or more storage devices, one or more data readers for reading data written to said one or more storage devices and transferring said data from the one or more data readers to error checking apparatus, said error checking apparatus being arranged to determine whether or not the number of errors in each block of data exceeds a predetermined number and to output the result together with at least a portion of the corresponding information for each block of data, a history store for storing information relating to at least some of the data blocks written to the one or more storage devices, said information including at least a portion of said header (or supplementary) information corresponding to each block of data written to the one or more storage devices, comparison apparatus for comparing the header (or supplementary) information output by the error checking apparatus with the header (or supplementary) information in the history store to identify the data block to which an error checking output relates, and apparatus for marking the data block associated with said matching header (or supplementary) information as being good or bad according to the output of the error checking apparatus, the apparatus further comprising apparatus arranged to cause said comparison apparatus to disregard at least part of the header (or supplementary) information and compare only the remaining portion of said information with the corresponding information in said history store.
Also in accordance with the present invention, there is provided a method for transferring data from a host system to one or more magnetic tape storage devices or the like, the method comprising the steps of receiving said data and dividing it into blocks, converting said blocks of data to a format suitable for storage on said one or more storage devices, each block of data including header (or supplementary) information for uniquely identifying the corresponding data block, writing said blocks of data to said one or more storage devices, reading data written to said one or more storage devices and transferring said data to error checking apparatus, said error checking apparatus being arranged to determine whether or not the number of errors in each block of data exceeds a predetermined number and to output the result together with at least a portion of the corresponding header (or supplementary) information for each block of data, storing in a history store information relating to at least some of the data blocks written to the one or more storage devices, said information including at least a portion of the header (or supplementary) information corresponding to each block of data written to the one or more storage devices, comparing the header (or supplementary) information output by the error checking apparatus with the header (or supplementary) information in the history store to identify the data block to which an error checking output relates, and marking the data block associated with said matching header (or supplementary) information as being good or bad according to the output of the error checking apparatus, the method further comprising the step of disregarding at least part of the header (or supplementary) information and comparing only the remaining portion of said information with the corresponding information in said history store.
The apparatus for disregarding at least part of the header (or supplementary) information when comparing a data block read back from a storage device with the contents of the history store preferably comprises a programmable register or table relating to a plurality of portions of said header (or supplementary) information, each of said portions being able to be set to xe2x80x98onxe2x80x99 or xe2x80x98offxe2x80x99 so that they will be disregarded or taken into account respectively during the comparison process.
The data is preferably written to the tape in codeword quad (or CQ) sets comprising an array of ECC encoded codeword pairs. Each codeword pair is uniquely identified (when read back) by header information comprising a plurality of bits including a parity bit, writepass bits, an acn (actual CQ set number), codeword pair ID bits, and dataset ID bits and, in a preferred embodiment of the invention at least some of the header bits can be selectively masked or otherwise disregarded, and therefore ignored, during the comparison process. In a preferred embodiment, all except the acn bits of the header are masked, such that only the acn bits are used in the comparison process The remaining bits can be considered to contain redundant information As a result, many more codeword pairs having bit-errors in their headers are accepted as being of sufficient quality, thereby reducing the number of rewrites in the presence of bit-errors which would not affect the recovery of data, thereby allowing data to be written faster using less tape.